#include<stdio.h>
int main()
{
	int seconds, hour, min;
	scanf_s("%d", &seconds);
	hour = seconds / 3600;
	min = (seconds % 3600) / 60;
	seconds = (seconds % 3600) % 60;
	printf("%d %d %d", hour, min, seconds);

}